// 运行时配置
import { RunTimeLayoutConfig, RequestConfig } from '@umijs/max';
import "./app.less";

// 全局初始化数据配置，用于 Layout 用户信息和权限初始化
// 更多信息见文档：https://umijs.org/docs/api/runtime-config#getinitialstate
export async function getInitialState(): Promise<{ name: string }> {
  return { name: '' };
}

export const layout: RunTimeLayoutConfig = () => {
  return {
    logo: 'https://img.alicdn.com/tfs/TB1YHEpwUT1gK0jSZFhXXaAtVXa-28-27.svg',
    menu: {
      locale: false,
    },
    rightContentRender: () => {
      return <div style={{paddingRight: 32}}>
        <a href='https://gitee.com/smith/go-execer' target='_blank' style={{color: 'inherit'}} rel="noreferrer">Gitee</a>
      </div>
    },
    layout: 'top',
    token: {
      header: {
        heightLayoutHeader: 55,
      },
      pageContainer: {
        paddingBlockPageContainerContent: 0,
        paddingInlinePageContainerContent: 0,
      }
    },
  };
};

export const request:RequestConfig = {
  baseURL: '/go-execer/api',
};